<template>
    <div >
        <div class="recommend-title">
            <span class="iconfont heart">&#xe757;</span>
            周末去哪儿</div>
        <ul>
            <li class="item" v-for="item of weekendList" :key="item.id">
                <div class="img-wrapper"><img class="img-content" :src="item.imgUrl"></div>
                <div class="item-info">
                    <p class="item-title">{{item.itemtitle}}</p>
                    <p class="item-desc">{{item.itemdesc}}</p>
                </div>
            </li>
        </ul>
    </div>
</template>

<script>
export default {
  name: 'HomeRecommend',
  props: {
    weekendList: {
      type: Array
    }
  }
}
</script>

<style scoped lang="stylus">
    @import '~styles/mixins.styl'
    .recommend-title
        line-height: 0.8rem
        background-color: #eeeeee
        text-indent: .2rem
        font-size: 0.3rem
        .heart
            color: red
            font-size: 0.3rem
    .item
        width: 100%
        .img-wrapper
            height: 0
            width: 100%
            padding-bottom: 37%
            background: red
            .img-content
                display: block
                width: 100%
        .item-info
            position: relative
            padding: 0.1rem
        .item-title
            line-height: 0.44rem
            font-size: 0.3rem
            padding: 0.1rem 0 0.1rem 0.2rem
        .item-desc
            font-size: 0.24rem
            line-height: 0.4rem
            padding: 0 0.2rem 0 0.2rem
            overflow: hidden
            color: $darktextcolor
            ellipsis()
</style>
